<%= form_for(@piginfo) do |f| %>
  <% if @piginfo.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@piginfo.errors.count, "error") %> prohibited this piginfo from being saved:</h2>

      <ul>
      <% @piginfo.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :pigid %><br />
    <%= f.text_field :pigid %>
  </div>
  <div class="field">
    <%= f.label :breed_id %><br />
    <%= f.text_field :breed_id %>
  </div>
  <div class="field">
    <%= f.label :earid %><br />
    <%= f.text_field :earid %>
  </div>
  <div class="field">
    <%= f.label :sex %><br />
    <%= f.text_field :sex %>
  </div>
  <div class="field">
    <%= f.label :birthday %><br />
    <%= f.date_select :birthday %>
  </div>
  <div class="field">
    <%= f.label :birthorder %><br />
    <%= f.text_field :birthorder %>
  </div>
  <div class="field">
    <%= f.label :brothersnum %><br />
    <%= f.text_field :brothersnum %>
  </div>
  <div class="field">
    <%= f.label :left %><br />
    <%= f.text_field :left %>
  </div>
  <div class="field">
    <%= f.label :right %><br />
    <%= f.text_field :right %>
  </div>
  <div class="field">
    <%= f.label :weight %><br />
    <%= f.text_field :weight %>
  </div>
  <div class="field">
    <%= f.label :state %><br />
    <%= f.text_field :state %>
  </div>
  <div class="field">
    <%= f.label :momid %><br />
    <%= f.text_field :momid %>
  </div>
  <div class="field">
    <%= f.label :dadid %><br />
    <%= f.text_field :dadid %>
  </div>
  <div class="field">
    <%= f.label :com_id %><br />
    <%= f.text_field :com_id %>
  </div>
  <div class="field">
    <%= f.label :grouporder %><br />
    <%= f.text_field :grouporder %>
  </div>
  <div class="field">
    <%= f.label :mating_id %><br />
    <%= f.text_field :mating_id %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
